<extend name="common:commonNewerTemplate" />
<block name="main_content">
<div id="content">
	<style>
		.addressSelect{
			color: #000;
		    float: right;
		    font-size: 20px;
		    font-weight: bold;
		    line-height: 20px;
		    opacity: 0.2;
		    text-shadow: 0 1px 0 #fff;
		}
		.alert .addressSelect{
			line-height: 20px;
		    position: relative;
		    right: -21px;
		    top: -2px;
		}
	</style>
	<div id="content-header">
		<div id="breadcrumb">
			<a class="tip-bottom" href="#"
				data-original-title="Go to Home"><i class="icon-home"></i> 首页</a>
			<a href="#">经销商</a> <a class="current" href="#">经销商订单录入</a>
		</div>
	</div>

    <div id="">
        <!-- 	<style>
                .addressSelect{
                    color: #000;
                    float: right;
                    font-size: 20px;
                    font-weight: bold;
                    line-height: 20px;
                    opacity: 0.2;
                    text-shadow: 0 1px 0 #fff;
                }
                .alert .addressSelect{
                    line-height: 20px;
                    position: relative;
                    right: -21px;
                    top: -2px;
                }
            </style> -->
        <div class="container-fluid" id="biz_dealer">
            <div class="row-fluid">
                <div class="span12">
                    <div class="widget-box">
                        <div class="widget-title">
						<span class="icon"> <i class="icon-info-sign"></i>
						</span>
                            <h5>请选择一个经销商</h5>
                        </div>
                        <div class="widget-content nopadding" >
                            <div class="widget-content nopadding">
                                <table id="search_result" page_index="1" class="table table-bordered table-striped" style="font-size:1.5em;">
                                    <thead>
                                    <tr>
                                        <th>选择</th>
                                        <th>经销商编号</th>
                                        <th>经销商姓名</th>
                                        <th>经销商默认返点</th>
                                        <th>业务对接人</th>
                                        <th>业务对接人电话</th>
                                        <th>大区</th>
                                        <th>省名称</th>
                                        <th>法人代表</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <if condition="empty($lst_dealer_info)">
                                        <td colspan="10" style="text-align: center">暂没有经销商可以选择</td>
                                        <else /> <volist name="lst_dealer_info" id="deler_info"
                                                         empty="没有经销商可以选择">
                                        <tr>
                                            <td> <input class='input_check_box' name='checkOneBox' deler_id='{$deler_info.dealer_id}' type='radio' style='position:relative;width: 50px; opacity: 100;'></td>
                                            <td>{$deler_info.dealer_id}</td>
                                            <td>{$deler_info.dealer_name}</td>
                                            <td>{$deler_info.discount_rate}</td>
                                            <td>{$deler_info.business_leader}</td>
                                            <td>{$deler_info.business_leader_cellphone}</td>
                                            <td>{$deler_info.area_name}</td>
                                            <td>{$deler_info.province_name}</td>
                                            <td>{$deler_info.leal_person}</td>
                                        </tr>
                                    </volist> </if>
                                    </tbody>
                                </table>
                            </div>
                            <if condition="!empty($lst_dealer_info)">
                                <div style="text-align: center">
                                    <a id='check_this_dealer' class="btn btn-success btn-large" type="submit">确认选择</a>
                                </div>
                            </if>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


</div>
</block>

<block name="js_content">
<script>
    DealerCartPage = {
        'BindEvent': function(){
            $('#check_this_dealer').bind('click', function(){
                var deler_id = '';
                $('input[name="checkOneBox"]:checked').each(function(){
                    deler_id=$(this).attr('deler_id');
                });

                if(deler_id ==''){
                    alert('请选择经销商信息');
                    return;
                }

                var url = "/Dealer/dealercartstep2?dealer_id=" + deler_id;
                window.location.href = url;
            });
        },
        'SearchDealer':function(){

        }
    };


    $(document).ready(function(){
        DealerCartPage.BindEvent();
    });

</script>
</block>